package com.mrobuy.jdvc.entity;

import com.gavel.annotation.FieldMeta;
import com.gavel.annotation.TableMeta;
import com.gavel.database.SQLExecutor;

import java.util.List;

@TableMeta(name = "VC_CATEGORY_PROP", title = "京东类目属性")
public class VCCategoryProp {

    @FieldMeta(name = "ID", title = "ID", length = 32, primary = true)
    private String id;

    @FieldMeta(name = "CID", title = "类目ID", length = 32)
    private String cid;

    @FieldMeta(name = "GROUPID", title = "属性组ID", length = 32)
    private String groupid;

    @FieldMeta(name = "GROUPNAME", title = "属性组名称", length = 32)
    private String groupname;

    @FieldMeta(name = "GROUPORDER", title = "属性组顺序", length = 20)
    private String grouporder;

    @FieldMeta(name = "PROPID", title = "规格参数ID", length = 32)
    private String propid;  // 规格参数ID

    @FieldMeta(name = "PROPORDER", title = "参数顺序", length = 20)
    private String proporder;  // 单选属性值ID

    @FieldMeta(name = "PROPNAME", title = "参数名称", length = 20)
    private String propname;  // 数值/文本内容/单选备注

    @FieldMeta(name = "REQUIRED", title = "是否必填", length = 8)
    private String required;  // "required": false,

    @FieldMeta(name = "INPUTTYPE", title = "输入类型", length = 8)
    private String inputtype;  // "inputType": 3,

    @FieldMeta(name = "ATTRALIAS", title = "属性别名", length = 8)
    private String attralias;  //"attrAlias": "",

    @FieldMeta(name = "VALUNIT", title = "属性值单位", length = 20)
    private String valunit;  // "valUnit": "",

    @FieldMeta(name = "MAINTAINREMARK", title = "维护备注/示例", length = 20)
    private String maintainremark;  // "maintainRemark": "",

    private List<VCPropValue> options;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getGroupid() {
        return groupid;
    }

    public void setGroupid(String groupid) {
        this.groupid = groupid;
    }

    public String getGroupname() {
        return groupname;
    }

    public void setGroupname(String groupname) {
        this.groupname = groupname;
    }

    public String getGrouporder() {
        return grouporder;
    }

    public void setGrouporder(String grouporder) {
        this.grouporder = grouporder;
    }

    public String getPropid() {
        return propid;
    }

    public void setPropid(String propid) {
        this.propid = propid;
    }

    public String getProporder() {
        return proporder;
    }

    public void setProporder(String proporder) {
        this.proporder = proporder;
    }

    public String getPropname() {
        return propname;
    }

    public void setPropname(String propname) {
        this.propname = propname;
    }

    public String getRequired() {
        return required;
    }

    public void setRequired(String required) {
        this.required = required;
    }

    public String getInputtype() {
        return inputtype;
    }

    public void setInputtype(String inputtype) {
        this.inputtype = inputtype;
    }

    public String getAttralias() {
        return attralias;
    }

    public void setAttralias(String attralias) {
        this.attralias = attralias;
    }

    public String getValunit() {
        return valunit;
    }

    public void setValunit(String valunit) {
        this.valunit = valunit;
    }

    public String getMaintainremark() {
        return maintainremark;
    }

    public void setMaintainremark(String maintainremark) {
        this.maintainremark = maintainremark;
    }

    public List<VCPropValue> getOptions() {
        return options;
    }

    public void setOptions(List<VCPropValue> options) {
        this.options = options;
    }

    @Override
    public String toString() {
        return "VCCategoryProp{" +
                "id='" + id + '\'' +
                ", cid='" + cid + '\'' +
                ", groupid='" + groupid + '\'' +
                ", groupname='" + groupname + '\'' +
                ", grouporder='" + grouporder + '\'' +
                ", propid='" + propid + '\'' +
                ", proporder='" + proporder + '\'' +
                ", propname='" + propname + '\'' +
                ", required='" + required + '\'' +
                ", inputtype='" + inputtype + '\'' +
                ", attralias='" + attralias + '\'' +
                ", valunit='" + valunit + '\'' +
                ", maintainremark='" + maintainremark + '\'' +
                '}';
    }

    public static void main(String[] args) throws Exception {
        SQLExecutor.createTable(VCCategoryProp.class);
    }

}
